package com.dragee.modules.work.demo;

import com.dragee.common.R;
import com.dragee.utils.SystemUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author tys on 2023/4/27
 */
@RestController
@RequestMapping("demo")
@Api(tags = "Z - 测试")
public class DemoController {
    @GetMapping("demo1")
    @ApiOperation("demo1")
    public R list(HttpServletRequest request){
        String ipAddr = SystemUtil.getIpAddr(request);
        return R.ok().put("data", ipAddr);
    }
}
